package com.wrx.club_management_backend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wrx.club_management_backend.common.AjaxResult;
import com.wrx.club_management_backend.dto.LoginFormDTO;
import com.wrx.club_management_backend.dto.UserSearchDTO;
import com.wrx.club_management_backend.entity.User;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface UserService extends IService<User> {
    AjaxResult login(LoginFormDTO loginFormDTO);

    List<User> searchUsers(String keyword, String searchMode);

    AjaxResult friends();

    AjaxResult addFriend(Long id);

    AjaxResult detail();

    boolean isOnline(Long id);


    AjaxResult logout(HttpServletRequest request);

    void updateUser(User user, String token);

    AjaxResult removeFriend(Long userId);

    AjaxResult num();

    AjaxResult register(User user);

    boolean updatePassword(Long userId, String oldPassword, String newPassword);

    void delUser(String phone);

    AjaxResult search(UserSearchDTO dto);

    AjaxResult delUser(Long userId);
}
